<?php
/**
 * Created by clz.
 * User: clz
 * Date: 2018/8/3
 * Time: 20:07
 */


class Db
{
    public static function first()
    {
        $servername = "localhost";
        $username = "root";
        $password = "cao123456";
        $dbname = "bcj";

        // 创建连接
        $conn = new mysqli($servername, $username, $password,$dbname);

        // 检测连接
        if ($conn->connect_error) {
            die("Connection failed: " . $conn->connect_error);
        }
        echo "Connected successfully";
    }
}